package cn.wolfcode.shop.mapper;

import cn.wolfcode.shop.domain.OrderInfo;
import cn.wolfcode.shop.domain.SeckillOrder;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface SeckillOrderMapper {
    @Select("select * from t_seckill_order where user_id =#{userId} and good_id = #{goodId}")
    SeckillOrder selectSeckillOrder(@Param("userId") Long userId, @Param("goodId") Long goodId);
    @Insert("insert into t_seckill_order (user_id,order_no,good_id) values(#{userId},#{orderNo},#{goodId})")
    int insert(SeckillOrder seckillOrder);
}
